﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//MicroDesigner
using Jc.MicroDesigner.Objects;
using Jc.MicroDesigner.ElementsLib;
using Jc.MicroDesigner.Drawings.Tools;
using Jc.MicroDesigner.Drawings;
using System.Threading;

namespace Jc.MicroDesigner
{
    /// <summary>
    /// Форма для тестов
    /// </summary>
    public partial class TestForm : Form
    {
        /// <summary>
        /// Вызвать форму тестов
        /// </summary>
        public TestForm()
        {
            InitializeComponent();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            //Test();
            //Запуск тестов
            List<Tests.TestCase> _test = new List<Jc.MicroDesigner.Tests.TestCase>(
                new Tests.TestCase[] { new Tests.RSTest(), new Tests.LineTest() });

            Tests.TestFramework fr = new Jc.MicroDesigner.Tests.TestFramework(_test, Application.StartupPath);
            List<TimeSpan> times = fr.Start();

            string time = "Результат: ";
            for (int i = 0; i < times.Count; i++)
                time += times[i].ToString() + "\n";
            MessageBox.Show(time);
        }
    }
}